<template>
  <div class="myMap">
    <div id="ol-map"></div>
    <!-- <div class="myButton" @click="clickBtn">切换至市本级</div> -->
  </div>
</template>
<script>
import { init, clickBtn } from './init';
export default {
  name: 'OlMap',
  methods: {
    clickBtn() {
      clickBtn();
    }
  },
  mounted() {
    init();
  }
};
</script>
<style lang="less">
.myMap {
  width: 100%;
  height: inherit;
  position: relative;
  .mapbgMessage,
  .cx {
    position: absolute;
    width: 169px;
    height: 68px;
    background: url("./img/message.png");
    font-weight: 400;
    font-size: 20px;
    color: #ffffff;
    line-height: 28px;
    padding-top: 6px;
    z-index: 20000000;
  }
  .cx {
    top: 20px;
    left: -195px;
  }
  .yy {
    top: 60px;
    left: 500px;
  }
  .jb {
    top: 150px;
    left: -230px;
  }
  .hs {
    top: 255px;
    left: 560px;
  }
  .zh {
    top: 190px;
    left: -240px;
  }
  .bl {
    top: 155px;
    left: -150px;
  }
  .yz {
    top: 265px;
    left: -230px;
  }
  .fh {
    top: 245px;
    left: 600px;
  }
  .xs {
    top: 265px;
    left: -160px;
  }
  .nh {
    top: 235px;
    left: 620px;
  }
  .sbj {
    top: 85px;
    left: -150px;
  }
  .myButton {
    background-image: url("./img/button.png");
    width: 210px;
    height: 50px;
    position: absolute;
    z-index: 200;
    top: 162px;
    right: 770px;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    line-height: 26px;
    text-shadow: 0px 0px 6px rgba(30, 198, 255, 0.8);
    line-height: 50px;
    cursor: pointer;
  }
  .myButton2 {
    background-image: url("./img/button.png");
    width: 210px;
    height: 50px;
    position: relative;
    z-index: 20;
    font-weight: bold;
    font-size: 20px;
    color: #ffffff;
    line-height: 26px;
    text-shadow: 0px 0px 6px rgba(30, 198, 255, 0.8);
    line-height: 50px;
    cursor: pointer;
  }
}
#ol-map {
  width: 100%;
  height: inherit;
}
.mapm {
  position: relative;
  z-index: 2000;
  .l {
    background: url("./img/rightL.png");
    width: 172px;
    height: 298px;
    position: absolute;
    content: "";
    left: -160px;
    top: 50px;
    z-index: 10;
  }
  .l6 {
    background: url("./img/rightL.png");
    width: 100px;
    height: 298px;
    position: absolute;
    background-repeat: no-repeat;
    background-position: bottom left;
    img {
      width: 100%;
    }
    content: "";
    left: -80px;
    top: 50px;
    z-index: 10;
    background-size: 100%;
  }
  .l5,
  .l7 {
    background: url("./img/rightL.png");
    width: 100px;
    height: 298px;
    position: absolute;
    background-repeat: no-repeat;
    background-position: top left;
    img {
      width: 100%;
    }
    content: "";
    left: -80px;
    top: 50px;
    z-index: 10;
    background-size: 100%;
  }
  .l7 {
    left: -160px;
    width: 160px;
    height: 268px;
  }
  .l6 {
    background: url("./img/rightL.png");
    width: 150px;
    height: 208px;
    position: absolute;
    // background-repeat: no-repeat;
    // background-position: top left;
    background-size: 100% 100%;
    img {
      width: 100%;
    }
    content: "";
    left: -130px;
    top: 50px;
    z-index: 10;
    background-size: 100%;
  }
  .l2 {
    background: url("./img/line.png");
    width: 79px;
    height: 107px;
    position: absolute;
    content: "";
    left: -80px;
    top: 50px;
    z-index: 10;
  }
  .l4 {
    background: url("./img/line.png");
    width: 79px;
    height: 107px;
    position: absolute;
    content: "";
    right: -70px;
    top: 50px;
    z-index: 10;
    transform: scaleX(-1);
  }
  .l3 {
    background: url("./img/leftL.png");
    width: 172px;
    height: 298px;
    position: absolute;
    content: "";
    right: -160px;
    top: 50px;
    z-index: 10;
  }
  .mapClose {
    position: absolute;
    right: 21px;
    top: 21px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    z-index: 220;
    background-image: url("./img/mapClose.png");
  }
}
.mapModal {
  width: 502px;
  height: 605px;
  background: url("./img/mapModal.png");
  background-size: 100% 100%;
  position: relative;
  z-index: 200;

  .title {
    font-family: YouSheBiaoTiHei;
    font-size: 30px;
    color: #ffffff;
    line-height: 39px;
    // text-shadow: 0px 0px 20px rgba(0, 112, 255, 0.8);
    background: linear-gradient(to bottom, #fff, #65d0ff);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    padding-top: 4px;
  }
  .message {
    width: 460px;
    height: 109px;
    margin: 0 auto;
    margin-top: 23px;
    padding: 0 21px;
    display: flex;
    background-image: url("./img/mapBottom.png");
    background-repeat: no-repeat;
    background-position: center bottom;
    justify-content: space-between;
    .item {
      .num {
        font-weight: bold;
        font-size: 28px;
        color: #ffffff;
        line-height: 37px;
      }
      .text {
        font-size: 20px;
        color: #ffffff;
        line-height: 26px;
      }
    }
  }
  .bar {
    padding: 15px 43px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    .b1,
    .b3 {
      width: 164px;
      height: 164px;
      background: url("./img/bar2.png");
      position: relative;
      #mapEcharts,
      #mapEcharts2 {
        position: absolute;
        left: 0;
        right: 0;
        bottom: 0;
        top: 0;
        width: 164px;
        height: 164px;
      }
      .num2 {
        font-weight: bold;
        font-size: 28px;
        color: #ffffff;
        line-height: 37px;
        padding-top: 65px;
        span {
          font-size: 20px;
        }
      }
      .title2 {
        font-size: 20px;
        color: #ffffff;
        line-height: 26px;
        margin-top: 24px;
      }
    }
    .b2 {
      width: 1px;
      height: 140px;
      background: #00548f;
    }
  }
  .table {
    height: 208px;
    .otherList {
      height: 156px;
      overflow: scroll;
      cursor: pointer;
    }
  }
  .thead {
    margin: 0 auto;
    height: 52px;
    width: 460px;
    background: linear-gradient(180deg, rgba(71, 150, 217, 0.3) 0%, rgba(34, 93, 177, 0.3) 100%);
    border-bottom: 2px solid rgba(22, 124, 255, 0.3);
    display: flex;
    align-items: center;
    text-align: left;
    font-size: 20px;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2px;
    position: relative;
    & > div {
      width: 25%;
      text-align: center;
    }
    .th1 {
      width: 40%;
    }
    .th2 {
      width: 20%;
    }
    .th3 {
      width: 20%;
    }
    .th4 {
      width: 20%;
    }
    .leftBottomIcon {
      width: 5px;
      height: 5px;
      background-image: url("./img/leftBottomIcon.png");
      position: absolute;
      left: 5px;
      top: 4px;
    }
  }
  .line {
    margin: 0 auto;
    display: flex;
    width: 460px;
    height: 52px;
    background: rgba(39, 61, 118, 0.23);
    border: 1px solid rgba(143, 179, 255, 0.2);
    border-top: 0;
    font-size: 20px;
    color: #ffffff;
    line-height: 52px;
    & > div {
      text-align: center;
      width: 25%;
    }
    .th1 {
      width: 40%;
    }
    .th2 {
      width: 20%;
    }
    .th3 {
      width: 20%;
    }
    .th4 {
      width: 20%;
    }
  }
}
</style>
